package durose.system.serviceImpl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import durose.system.mapper.Sys_logMapper;
import durose.system.pojo.Sys_log;
import durose.system.pojo.Sys_logExample;
import durose.system.service.Sys_logService;

@Service
public class Sys_logServiceImpl implements Sys_logService {
	@Autowired
	Sys_logMapper mapper;
	
	@Override
	public int sys_logAdd(Sys_log pojo) {
		return mapper.insert(pojo);
	}

	@Override
	public void sys_logDelete(int id) {
		mapper.deleteByPrimaryKey(id);
	}

	@Override
	public void sys_logUpdate(Sys_log pojo) {
		mapper.updateByPrimaryKey(pojo);
	}

	@Override
	public Sys_log sys_logGet(int id) {
		return mapper.selectByPrimaryKey(id);
	}

	@Override
	public List<Sys_log> sys_logList(String queryName) {
		Sys_logExample example = new Sys_logExample();
		example.createCriteria().andLog_nameLike('%'+queryName+'%');
		return mapper.selectByExample(example);
	}

}
